1 <?php
2 session_start();
3 error_reporting(
0);
4 include(
'includes/config.php');
5 if
(strlen($_SESSION['alogin'])==0)
6     {
7 header(
'location:index.php');
8 }

9 else
{
10     
// code for cancel
11 if
(isset($_REQUEST['eid']))
12     {
13 $eid=intval($_GET[
'eid']);
14 $status=
1;
15
16 $sql =
"UPDATE tblenquiry SET Status=:status WHERE id=:eid";
17 $query = $dbh->prepare($sql);
18 $query -> bindParam(
':status',$status, PDO::PARAM_STR);
19 $query-> bindParam(
':eid',$eid, PDO::PARAM_STR);
20 $query -> execute();
21
22 $msg=
"Enquiry successfully read";
23 }
24
25
26
27
28
29     ?>
30 <!DOCTYPE HTML>
31 <html>
32 <head>
33 <title>TMS | Admin manage Issues</title>
34 <meta name=
"viewport" content="width=device-width, initial-scale=1">
35 <meta http-equiv=
"Content-Type" content="text/html; charset=utf-8" />
36 <script type=
"application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
37 <link href=
"css/bootstrap.min.css" rel='stylesheet' type='text/css' />
38 <link href=
"css/style.css" rel='stylesheet' type='text/css' />
39 <link rel=
"stylesheet" href="css/morris.css" type="text/css"/>
40 <link href=
"css/font-awesome.css" rel="stylesheet">
41 <script src=
"js/jquery-2.1.4.min.js"></script>
42 <link rel=
"stylesheet" type="text/css" href="css/table-style.css" />
43 <link rel=
"stylesheet" type="text/css" href="css/basictable.css" />
44 <script type=
"text/javascript" src="js/jquery.basictable.min.js"></script>
45 <script type=
"text/javascript">
46     $(document).ready(function() {
47       $(
'#table').basictable();
48
49       $(
'#table-breakpoint').basictable({
50         breakpoint:
768
51       });
52
53       $(
'#table-swap-axis').basictable({
54         swapAxis:
true
55       });
56
57       $(
'#table-force-off').basictable({
58         forceResponsive:
false
59       });
60
61       $(
'#table-no-resize').basictable({
62         noResize:
true
63       });
64
65       $(
'#table-two-axis').basictable();
66
67       $(
'#table-max-height').basictable({
68         tableWrapper:
true
69       });
70     });
71 </script>
72 <link href=
'//fonts.googleapis.com/css?family=Roboto:700,500,300,100italic,100,400' rel='stylesheet' type='text/css'/>
73 <link href=
'//fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
74 <link rel=
"stylesheet" href="css/icon-font.min.css" type='text/css' />
75   <style>
76         .errorWrap {
77     padding: 10px;
78     margin:
0 0 20px 0;
79     background: #fff;
80     border-left: 4px solid #dd3d36;
81     -webkit-box-shadow:
0 1px 1px 0 rgba(0,0,0,.1);
82     box-shadow:
0 1px 1px 0 rgba(0,0,0,.1);
83 }
84 .succWrap{
85     padding: 10px;
86     margin:
0 0 20px 0;
87     background: #fff;
88     border-left: 4px solid #5cb85c;
89     -webkit-box-shadow:
0 1px 1px 0 rgba(0,0,0,.1);
90     box-shadow:
0 1px 1px 0 rgba(0,0,0,.1);
91 }
92         </style>
93         <script language=
"javascript" type="text/javascript">
94 var
popUpWin=0;
95 function popUpWindow(URLStr, left, top, width, height)
96 {
97  
if(popUpWin)
98 {

99 if
(!popUpWin.closed) popUpWin.close();
100 }
101 popUpWin = open(URLStr,
'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width='+600+',height='+600+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
102 }
103
104 </script>
105 </head>
106 <body>
107    <div
class="page-container">
108    <!--/content-inner-->
109 <div
class="left-content">
110        <div
class="mother-grid-inner">
111             <!--header start here-->
112                 <?php include(
'includes/header.php');?>
113                      <div
class="clearfix"> </div>
114                 </div>
115 <!--heder end here-->
116 <ol
class="breadcrumb">
117                 <li
class="breadcrumb-item"><a href="index.html">Home</a><i class="fa fa-angle-right"></i>Manage Issues</li>
118             </ol>
119 <div
class="agile-grids">
120                 <!-- tables -->
121                 <?php
if($error){?><div class="errorWrap"><strong>ERROR</strong>:<?php echo htmlentities($error); ?> </div><?php }
122                 
else if($msg){?><div class="succWrap"><strong>SUCCESS</strong>:<?php echo htmlentities($msg); ?> </div><?php }?>
123                 <div
class="agile-tables">
124                     <div
class="w3l-table-info">
125                       <h2>Manage Issues</h2>
126                         <table id=
"table">
127                         <thead>
128                           <tr>
129                           <th>#</th>
130                             <th>Name</th>
131                             <th>Mobile No.</th>
132                             <th>Email Id</th>
133                             <th>Issues </th>
134                             <th>Description </th>
135                             <th>Posting date </th>
136                             <th>Action </th>
137                             
138                           </tr>
139                         </thead>
140                         <tbody>
141 <?php $sql =
"SELECT tblissues.id as id,tblusers.FullName as fname,tblusers.MobileNumber as mnumber,tblusers.EmailId as email,tblissues.Issue as issue,tblissues.Description as Description,tblissues.PostingDate as PostingDate from tblissues join tblusers on tblusers.EmailId=tblissues.UserEmail";
142 $query = $dbh -> prepare($sql);
143 $query->execute();
144 $results=$query->fetchAll(PDO::FETCH_OBJ);

145
146 if
($query->rowCount() > 0)
147 {

148 foreach
($results as $result)
149 { ?>
150                           <tr>
151                             <td width=
"120">#00<?php echo htmlentities($result->id);?></td>
152                             <td width=
"50"><?php echo htmlentities($result->fname);?></td>
153                                 <td width=
"50"><?php echo htmlentities($result->mnumber);?></td>
154                             <td width=
"50"><?php echo htmlentities($result->email);?></td>
155                         
156                             <td width=
"200"><?php echo htmlentities($result->issue);?></a></td>
157                             <td width=
"400"><?php echo htmlentities($result->Description);?></td>
158                             
159                                 <td width=
"50"><?php echo htmlentities($result->PostingDate);?></td>
160             
161
162 <td><a href=
"javascript:void(0);" onClick="popUpWindow('http://localhost/tms/admin/updateissue.php?iid=<?php echo ($result->id);?>');">View </a>
163 </td>
164
165 </tr>
166                          <?php } }?>
167                         </tbody>
168                       </table>
169                     </div>
170                   </table>
171
172                 
173             </div>
174 <!-- script-
for sticky-nav -->
175         <script>
176         $(document).ready(function() {
177              
var navoffeset=$(".header-main").offset().top;
178              $(window).scroll(function(){
179                 
var scrollpos=$(window).scrollTop();
180                 
if(scrollpos >=navoffeset){
181                     $(
".header-main").addClass("fixed");
182                 }
else{
183                     $(
".header-main").removeClass("fixed");
184                 }
185              });
186              
187         });
188         </script>
189         <!-- /script-
for sticky-nav -->
190 <!--inner block start here-->
191 <div
class="inner-block">
192
193 </div>
194 <!--inner block end here-->
195 <!--copy rights start here-->
196 <?php include(
'includes/footer.php');?>
197 <!--COPY rights end here-->
198 </div>
199 </div>
200   <!--
//content-inner-->
201         <!--/sidebar-menu-->
202                         <?php include(
'includes/sidebarmenu.php');?>
203                               <div
class="clearfix"></div>
204                             </div>
205                             <script>
206                             
var toggle = true;
207                                         
208                             $(
".sidebar-icon").click(function() {
209                               
if (toggle)
210                               {
211                                 $(
".page-container").addClass("sidebar-collapsed").removeClass("sidebar-collapsed-back");
212                                 $(
"#menu span").css({"position":"absolute"});
213                               }
214                               
else
215                               {
216                                 $(
".page-container").removeClass("sidebar-collapsed").addClass("sidebar-collapsed-back");
217                                 setTimeout(function() {
218                                   $(
"#menu span").css({"position":"relative"});
219                                 },
400);
220                               }
221                                             
222                                             toggle = !toggle;
223                                         });
224                             </script>
225 <!--js -->
226 <script src=
"js/jquery.nicescroll.js"></script>
227 <script src=
"js/scripts.js"></script>
228 <!-- Bootstrap Core JavaScript -->
229    <script src=
"js/bootstrap.min.js"></script>
230    <!-- /Bootstrap Core JavaScript -->
231
232 </body>
233 </html>
234 <?php } ?>


Gõ tìm kiếm nhanh...